﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Practices.EnterpriseLibrary.PolicyInjection;

using NCS.IConnect.ApplicationContexts;

using JM.JCY.BusinessFacade;
using JM.JCY.Common;
using JM.JCY.BusinessEntity;

namespace JM.JCY.Proxy
{
    public class PerformanceCaseProxy : JCYProxyBase<IPerformanceCase>, IPerformanceCase
    {
        private IPerformanceCase GetInstance()
        {
            return PolicyInjection.Create<PerformanceCaseBF, IPerformanceCase>();
        }

        public void UpdatePerformanceCase(PerformanceCaseDataSet.T_PerformanceCaseDataTable dt)
        {
            this.GetInstance().UpdatePerformanceCase(dt);
        }

        public PerformanceCaseDataSet.T_PerformanceCaseDataTable GetPerformanceCase(int caseId, string name)
        {
            return this.GetInstance().GetPerformanceCase(caseId, name);
        }

        public void UpdateLiangHuaStatistics(PerformanceCaseDataSet.T_LiangHuaStatisticsDataTable dt)
        {
            this.GetInstance().UpdateLiangHuaStatistics(dt);
        }

        public PerformanceCaseDataSet.T_LiangHuaStatisticsDataTable GetLiangHuaStatistics(int caseId, string year, string dept, string name)
        {
            return this.GetInstance().GetLiangHuaStatistics(caseId, year, dept, name);
        }
    }
}
